# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: Orhun Parmaksız <orhun@archlinux.org>
# Maintainer: T.J. Townsend <blakkheim@archlinux.org>
# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgname=scrot
pkgver=1.9
pkgrel=1
pkgdesc='Simple command-line screenshot utility for X'
url='https://github.com/resurrecting-open-source-projects/scrot'
arch=('loong64' 'x86_64')
license=('MIT')
depends=('imlib2' 'libxext' 'libxinerama' 'libxfixes' 'libxcomposite' 'libbsd')
makedepends=('autoconf-archive')
source=("${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha512sums=('da976fe44b0eeb5938d12a1205c41eaf8f42ebbcc739faffaa6df55bc84bb029981def83bbf4ce01aaab4622d2f2236fe7462d1938f92f111b6e92a280ecf0c7')
b2sums=('3e479d1327111b29bebf3be19659a79e8ecdb770743525db77f0a5fb5480d82a6a56611ed94152f08e402b52626c590a5efb6b3e3119af69bfcb2bab993810b6')

prepare(){
  cd ${pkgname}-${pkgver}
  autoreconf -fiv
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure \
    --prefix=/usr \
    --mandir=/usr/share/man
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm644 README.md ChangeLog -t "${pkgdir}"/usr/share/doc/${pkgname}
  install -Dm644 COPYING -t "${pkgdir}"/usr/share/licenses/${pkgname}
}

# vim: ts=2 sw=2 et:
